import express from 'express';
import UserModel from "../../mongo/models/user"

const router = express.Router();
// 用户列表
router.post('/info/list', (req: any, res) => {
    UserModel.find({ _id: req.jwtInfo.id }).then((doc) => {
        if (!doc) {
            res.json({
                code: 1,
                msg: '查询失败'
            })
        } else {
            res.json({
                code: 0,
                msg: '查询成功',
                data: doc,
            })
        }
    })
})

export default router; 